package com.sgcc.manager.sql.util;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * 字符串输出流类
 * @author liubin
 * @since 2012-7-26
 */
public class StringPrintWriter extends PrintWriter {
	
    public StringPrintWriter() {
        super(new StringWriter());
    }

    public StringPrintWriter(int initialSize) {
        super(new StringPrintWriter(initialSize));
    }
    
    /**
     * 获取字符串
     * @return String 字符串
     */
    public String getString() {
        this.flush();
        return ((StringWriter)this.out).toString();
    }
}
